package com.example.shop.fgo.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.example.shop.fgo.base.YBaseFragment;

/**
 * Created by Administrator on 2017/2/8.
 */

public class ItemVPHomeAdapter extends FragmentPagerAdapter{
    private YBaseFragment[] mFragments;

    public ItemVPHomeAdapter(FragmentManager fm, YBaseFragment[] fragments) {
        super(fm);
        mFragments = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return mFragments[position];
    }

    @Override
    public int getCount() {
        return mFragments.length;
    }
}
